<!-- 物料入库历史记录 -->

<script setup>
import { ref } from 'vue'
import { RefreshRight } from '@element-plus/icons-vue'


//文本框value值和时间响应值
const input = ref('')
const indate1 = ref('')
const indate2 = ref('')

//测试数据
const testdata = [
  {
    "1": 1,
    "2": 'E1006',
    "3": '2019-04-01 13:23:12',
    "4": '2019-04-01 16:00:12至2019-04-01 18:12:12',
    "messages": ['2019-04-03 18:12:12 张三 开始维修任务', '2019-04-03 18:12:12 李四 替换泵发动机过滤', '2019-04-03 18:12:12 王五 完成过滤棉更换']
  },
  {
    "1": 2,
    "2": 'E1008',
    "3": '2019-04-01 13:23:12',
    "4": '2019-04-01 16:00:12至2019-04-01 18:12:12',
    "messages": ['2019-04-03 18:12:12 张三 开始维修任务', '2019-04-03 18:12:12 李四 替换泵发动机过滤', '2019-04-03 18:12:12 王五 完成过滤棉更换']
  }
]

</script>

<template>
  <el-row style="background-color:white;margin:10px 10px 0 10px">
    <el-col :span="3" style="margin:10px 0 0 10px">设备维修历史记录</el-col>
  </el-row>
  <el-row style="background-color:white;margin:0 10px 0 10px">
    <el-col :span="2" style="margin:10px 0 0 10px">
      <el-button :icon="RefreshRight">刷新</el-button>
    </el-col>
    <el-col :span="5" style="margin-top:10px">
      <el-date-picker v-model="indate1" type="date" placeholder="维修日期开始" />
    </el-col>
    <el-col :span="5" style="margin-top:10px">
      <el-date-picker v-model="indate2" type="date" placeholder="维修日期结束" />
    </el-col>
    <el-col :span="9" style="margin-top:10px;margin-left: 20px;">
      <el-input v-model="input" placeholder="请输入设备名称" />
    </el-col>
    <el-col :span="2" style="margin-top:10px">
      <el-button type="success">搜索</el-button>
    </el-col>
  </el-row>
  <el-row style="background-color:white;margin:0 10px 0 10px">
    <el-col :span="24" style="margin-top:15px">
      <!--:data为测试数据，可对应数据库修改  stripe斑马纹效果 border带边框 -->
      <el-table :data="testdata" stripe border style="width:100%">
        <!-- 定义列表属性 prop值可对于数据库字段名修改-->
        <el-table-column label="序号" align="center" prop="1" width="200" />
        <el-table-column label="维修设备" align="center" prop="2" width="200" />
        <el-table-column label="申请维修时间" align="center" prop="3" width="150" />
        <el-table-column label="实际维修时间" align="center" prop="4" width="200" />
        <el-table-column label="维修信息" align="center">
          <template #default="scope">
            <div v-for="i in scope.row.messages">
              <span>{{ i }}</span>
            </div>
          </template>
        </el-table-column>
      </el-table>
    </el-col>
  </el-row>
</template>

<style scoped>

</style>